#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int test(int n,int count,int a,int b)
{
	if (n == 1 || n == 2)
	{
		return count;
	}
	count = a + b;
	a = b;
	b = count;
	return test(n - 1,count,a,b);
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%d",test(n,1,1,1));
	return 0;
}